package com.wiloon.androidx;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;

public class CanvasDemoActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(new CustomView(this));
	}

	class CustomView extends View {

		Paint paint;

		public CustomView(Context context) {
			super(context);
			paint = new Paint();
			paint.setColor(Color.BLACK);
			paint.setStrokeJoin(Paint.Join.ROUND);
			paint.setStrokeCap(Paint.Cap.ROUND);
			paint.setStrokeWidth(3);
		}

		@Override
		protected void onDraw(Canvas canvas) {
			// canvas.drawCircle(100, 100, 90, paint);
			canvas.drawText("Point", 105, 105, paint);
		}
	}
}